package com.diagrammer.vo
{
	import mx.utils.UIDUtil;
	
	[Bindable]
	/**
	 * 线条value object
	 * 
	 * @author Dwei <b>2012-02-10</b>
	 * 
	 */	
	public class LineVO
	{
//============================================================================
//parameter
//============================================================================
		private var _ID:String;
		
		private var _label:String;
		
		private var _data:XML;
		
		private var _fromID:String;
		
		private var _toID:String;
//============================================================================
//constructor
//============================================================================
		public function LineVO()
		{
			_ID = UIDUtil.createUID().replace(/-/g, "");
			_label = "";
			_fromID = "";
			_toID = "";
		}
//============================================================================
//getter/setter
//============================================================================

		/**
		 * 线条唯一标识，忽略空字符串和null<br/>
		 * 默认为32位字符串(数字+大写字母)
		 */		
		public function get ID():String
		{
			return _ID;
		}

		public function set ID(value:String):void
		{
			if (!value) return;
			_ID = value;
		}

		/**
		 * 线条名称，不可以为null
		 */
		public function get label():String
		{
			return _label;
		}

		/**
		 * @private
		 */
		public function set label(value:String):void
		{
			if (!value) return;
			_label = value;
		}

		/**
		 * 线条数据
		 */
		public function get data():XML
		{
			return _data;
		}

		/**
		 * @private
		 */
		public function set data(value:XML):void
		{
			_data = value;
		}

		/**
		 * 线条起始节点标识
		 */
		public function get fromID():String
		{
			return _fromID;
		}

		/**
		 * @private
		 */
		public function set fromID(value:String):void
		{
			_fromID = value;
		}

		/**
		 * 线条结束节点标识
		 */
		public function get toID():String
		{
			return _toID;
		}

		/**
		 * @private
		 */
		public function set toID(value:String):void
		{
			_toID = value;
		}
		
		
	}
}